using System;
using Tarkin.InfrastructureLibrary.Utilities.Collections;

namespace Tarkin.InfrastructureLibrary.Core.Basic
{
    /// <summary>
    /// The Element class is the implementation of the Element abstract class as defined by 
    /// section 10.1.2 of the Unified Modeling Language: Infrastructure specfication (version 
    /// 2.1.1, dated 07-02-06).
    /// </summary>
    /// <remarks>Tarkin classes are NOT thread-safe.</remarks>
    public abstract class Element
    {

#region Private Members

        /// <summary>
        /// Any Comments owned by the Element.
        /// </summary>
        private Set < Comment > ownedComments = null;

#endregion


#region Constructors

        /// <summary>
        /// Default cosntructor.
        /// </summary>
        public Element ()
        { }

#endregion


#region Public Properties

        /// <summary>
        /// Any Comments owned by the Element.
        /// </summary>
        public Set < Comment >  OwnedComments
        {
            get
            {
                if ( ownedComments == null )
                {
                    ownedComments = new Set < Comment > ();
                }

                return ownedComments;
            }
        }

#endregion

    }
}